
{extend name='public/window' /}

{block name="content"}
<style>
    .layui-upload-drag {
        position: relative;
        padding: 10px;
        border: 1px dashed #e2e2e2;
        background-color: #fff;
        text-align: center;
        cursor: pointer;
        color: #999;
        border-radius: 50%;
    }
    .layui-form-label{
        width: 110px;
    }
    .layui-input-block{
        width: 85%;
        margin-left: 146px;
    }
    .layui-input, .layui-textarea {
        display: block;
        width: 80%;
        padding-left: 10px;
    }
    /* .layui-form-select {
        position: absolute;
        right: 165px;
        top: 50%;
        } */
    .layui-form-select .layui-edge {
        position: absolute;
        right: 170px !important;
        top: 50%;
    }
    .layui-form-select dl {
        min-width: 80% !important;
    }
    .layui-form-label {
        width: 116px !important;
    }
</style>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 15px;">
            {if !empty($list['EleList'])}
            <div>费率用电</div>
            <table class="layui-table">
                <thead>
                <tr>
                    <td>表编号</td>
                    <td>峰开始</td>
                    <td>峰结束</td>
                    <td>峰电量</td>
                    <td>谷开始</td>
                    <td>谷结束</td>
                    <td>谷电量</td>
                    <td>平开始</td>
                    <td>平结束</td>
                    <td>平电量</td>
                    <td>倍率</td>
                    <td>峰单价</td>
                    <td>谷单价</td>
                    <td>平单价</td>
                    <td>分摊单价</td>
                </tr>
                </thead>
                <tbody class="role_list">
                {foreach $list['EleList'] as $key=>$id}
                <tr>
                    <td>{$id.pointId}</td>
                    <td>{$id.fstart}</td>
                    <td>{$id.fend}</td>
                    <td>{$id.fpower}</td>
                    <td>{$id.gstart}</td>
                    <td>{$id.gend}</td>
                    <td>{$id.gpower}</td>
                    <td>{$id.pstart}</td>
                    <td>{$id.pend}</td>
                    <td>{$id.ppower}</td>
                    <td>{$id.rate}</td>
                    <td>{$id.fmoney}</td>
                    <td>{$id.gmoney}</td>
                    <td>{$id.pmoney}</td>
                    <td>{$id.tmoney}</td>
                </tr>
                {/foreach}
                </tbody>

            </table>
            {/if}


            {if !empty($list['danList'])}
            <div>单一用电</div>
            <table class="layui-table">
                <thead>
                <tr>
                    <td>表编号</td>
                    <td>起码</td>
                    <td>止码</td>
                    <td>倍率</td>
                    <td>用量</td>
                    <td>单价</td>
                </tr>
                </thead>
                <tbody class="role_list">
                {foreach $list['danList'] as $key=>$id}
                <tr>
                    <td>{$id.pointId}</td>
                    <td>{$id.start}</td>
                    <td>{$id.end}</td>
                    <td>{$id.rate}</td>
                    <td>{$id.power}</td>
                    <td>{$id.money}</td>
                </tr>
                {/foreach}
                </tbody>

            </table>
            {/if}
            {if !empty($list['waterList'])}
            <div>水表</div>
            <table class="layui-table">
                <thead>
                <tr>
                    <td>表编号</td>
                    <td>起码</td>
                    <td>止码</td>
                    <td>倍率</td>
                    <td>用量</td>
                    <td>单价</td>
                </tr>
                </thead>
                <tbody class="role_list">
                {foreach $list['waterList'] as $key=>$id}
                <tr>
                    <td>{$id.pointId}</td>
                    <td>{$id.start}</td>
                    <td>{$id.end}</td>
                    <td>1</td>
                    <td>{$id.power}</td>
                    <td>{$id.money}</td>
                </tr>
                {/foreach}
                </tbody>

            </table>
            {/if}
        </div>
    </div>
</div>


<script>
    layui.use(['element', 'form', 'jquery','lucky','upload','laydate','xmSelect'], function () {
        var element = layui.element;
        var table = layui.table;
        var form = layui.form;
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var lucky=layui.lucky;
        laydate.render({
            elem: '#start_time'
            ,type: 'date',
            trigger: 'click'
        });
        laydate.render({
            elem: '#end_time'
            ,type: 'date',
            trigger: 'click'
        });
        form.on('submit(blush)', function (data) {
            lucky.FormSubmit("{:url('blush')}",data.field,true);
            return false;
        });
    })
</script>

{/block}

